package samples.chapter10;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("chapter10")
@RestController
public class Chapter10HelloController {
    @GetMapping("/hello")
    public String hello() {
        return "Hello";
    }

    @GetMapping("/admin/hello")
    public String admin() {
        return "Hello, admin!";
    }

    @GetMapping("/user/hello")
    public String user() {
        return "Hello, user!";
    }

    @GetMapping("/db/hello")
    public String db() {
        return "Hello, dba!";
    }

    @GetMapping("/oauth/hello")
    public String oauthHello() {
        return "Hello";
    }

    @GetMapping("/oauth/admin/hello")
    public String oauthAdmin() {
        return "Hello, admin!";
    }

    @GetMapping("/oauth/user/hello")
    public String oauthUser() {
        return "Hello, user!";
    }
}
